﻿using System;
using System.Windows.Input;
using TestBat.IViewModels.Dialogs;
using TestBat.ViewModels.Base.Commands;

namespace TestBat.ViewModels.Dialogs
{
    public class BusinessErrorDialogViewModel : DialogViewModel, IBusinessErrorDialogViewModel
    {
        public BusinessErrorDialogViewModel(Exception exception)
        {
            this.exception = exception;
        }

        public override ICommand CloseCommand
        {
            get
            {
                return new RelayCommand(e =>
                                            {
                                                InvokeCloseEvent();
                                            });
            }
        }

        public virtual Exception Exception { get { return exception; } }

        private readonly Exception exception;
    }
}
